/* 
 * File:   Streamlines.h
 * Author: mvdr
 *
 * Created on January 19, 2013, 2:13 PM
 */

#ifndef STREAMLINES_H
#define	STREAMLINES_H

#include "Visualizer.h"
#include "Vector.h"
#include <vector>
#include <utility>

class Streamlines: public Visualizer {
    int d_maxTime;
    int d_length;
    float d_time;
    std::vector<std::pair<Vector2f, int>> d_seeds; 
    
    public:
        Streamlines();
        
        void draw(float winW, float winH, int t, int slices, int slice_dt);
        void addSeed(float x, float y);
        void removeAllSeeds();
        void seedGrid();
        
        
    private:
        void drawFromSeed(Vector2f const &vec, double wn, double hn, int t);
        void removeSeeds();      
        void setLimits(Vector2f *vec, bool *changed);
        bool outOfBounds(Vector2f const &vec);
        

};

#endif	/* STREAMLINES_H */

